package app.ods;

/**
 * 公共常量定义
 */
public class Constant {
    // Kafka主题定义
    public static final String ODS_USER_BEHAVIOR_TOPIC = "ods_user_behavior";
    public static final String DWD_USER_BEHAVIOR_TOPIC = "dwd_user_behavior_enriched";
    public static final String DWS_USER_TAG_TOPIC = "dws_user_family_tag";

    // 行为类型枚举
    public static final String BEHAVIOR_TYPE_PURCHASE = "purchase"; // 购买
    public static final String BEHAVIOR_TYPE_SEARCH = "search";     // 搜索
    public static final String BEHAVIOR_TYPE_COLLECT = "collect";   // 收藏
    public static final String BEHAVIOR_TYPE_BROWSE = "browse";     // 浏览

    // 时间衰减规则常量
    public static final int TIME_WINDOW_30D = 30 * 24 * 60 * 60 * 1000; // 30天毫秒数
    public static final int TIME_WINDOW_60D = 60 * 24 * 60 * 60 * 1000; // 60天毫秒数
    public static final double TIME_DECAY_30D = 1.0; // 近30天衰减系数
    public static final double TIME_DECAY_60D = 0.5; // 30-60天衰减系数
    public static final double TIME_DECAY_OVER_60D = 0.2; // 60天以上衰减系数

    // 行为权重常量
    public static final double WEIGHT_PURCHASE = 1.0;
    public static final double WEIGHT_SEARCH = 0.8;
    public static final double WEIGHT_COLLECT = 0.4;
    public static final double WEIGHT_BROWSE = 0.2;

    // 宝宝年龄分段常量（用于DWS层判定）
    public static final String AGE_STAGE_EARLY_PREGNANCY = "孕早期(0-12周)";
    public static final String AGE_STAGE_MID_PREGNANCY = "孕中期(13-28周)";
    public static final String AGE_STAGE_LATE_PREGNANCY = "孕晚期(29-40周)";
    public static final String AGE_STAGE_0_3M = "0-3个月";
    public static final String AGE_STAGE_3_6M = "3-6个月";
    public static final String AGE_STAGE_6_12M = "6-12个月";
    public static final String AGE_STAGE_12_24M = "12-24个月";
    public static final String AGE_STAGE_24_36M = "24-36个月";
    public static final String AGE_STAGE_3_6Y = "3-6岁";
    public static final String AGE_STAGE_6_12Y = "6-12岁";
}